package hot100.logos91To100;

/**
 * @author logos
 * date 2025/7/19 12:51
 * @version v1.0
 * @Package hot100.logos91To100
 */
public class logos96 {

    /**
     * 96. 只出现一次的数字
     * https://leetcode.cn/problems/single-number/?envType=study-plan-v2&envId=top-100-liked
     */

    class Solution {
        public int singleNumber(int[] nums) {
            int ans = 0;
            for (int x : nums) {
                ans ^= x;
            }
            return ans;
        }
    }
}
